﻿namespace DG.Common.Patterns.MVVM
{
    public abstract class ViewModelBase : NotifyViewModel
    {
        public delegate void FinishedDelegate();
        public delegate void SendMessageDelegate(string message);

        public event FinishedDelegate Finished;
        public event SendMessageDelegate MessageSent;

        protected void RaiseFinished()
        {
            if (Finished != null) Finished();
        }
        protected void SendMessage(string message)
        {
            if (MessageSent != null) MessageSent(message);
        }
    }
}